#ifndef CAN_H
#define CAN_H CAN_H

typedef struct
{
   char msgtype;          // Message type M=message, R=Remote Transmit Request
                          //              S=status answer (status code in id)
   char format;           // Frame format S=standard, E=extended
   unsigned long int id;  // Identifier (network byteorder)
   unsigned char num;     // data length (valid: 0...8)
   char data[8];          // data (max 8 bytes)
} can_t;

void can_dump(can_t *can);
int is_valid(can_t *can);

#endif
